package org.groovycap.gcap;

import grails.converters.XML
import groovy.util.GroovyTestCase;
import org.groovycap.gcap.Alert;

class AlertTest extends GroovyTestCase {
	
	
	void testStatusEnum() {
		def capalert = new Alert(status:Status.ACTUAL, msgType:MsgType.ERROR)
	
		assert capalert.status.value == 'actual'	
		capalert.status = Status.EXERCISE
		assert capalert.status.value == 'exercise'
		
		//println capalert as XML
	}
	
	void testMsgTypeEnum() {
		def capalert = new Alert(status:Status.ACTUAL, msgType:MsgType.ERROR)
		
		assert capalert.msgType.value == 'error'
		capalert.msgType = MsgType.ACK
		assert capalert.msgType.value == 'ack'
		
	}

}
